<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_dictionary".
 *
 * @property integer $id
 * @property integer $column_id
 * @property string $name
 * @property string $description
 * @property double $min
 * @property double $max
 * @property integer $sortid
 * @property string $icon
 * @property integer $created_at
 * @property integer $updated_at
 */
class Dictionary extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'me_dictionary';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['column_id', 'sortid', 'created_at', 'updated_at'], 'integer'],
            [['description'], 'string'],
            [['min', 'max'], 'number'],
            [['name', 'icon'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '自增ID',
            'column_id' => '父级ID',
            'name' => '字典名称',
            'description' => '字典描述',
            'min' => '最小值',
            'max' => '最大值',
            'sortid' => '排序ID',
            'icon' => '图标路径',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
